package com.itxs.service;

import com.itxs.dao.OrderMapper;
import com.itxs.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Component
public class UserService {

    @Autowired
    UserMapper userMapper;

    @Autowired
    OrderMapper orderMapper;

    @Transactional
    public void getUser(){
        userMapper.selectByUserId(1);
        orderMapper.selectByOrderId(1);
    }
}
